package com.probiz.estore.eai.log.dao.impl;

import java.util.List;

import com.probiz.estore.common.model.eai.log.EaiJobLog;
import com.probiz.estore.core.dao.impl.HibernateGenericDaoImpl;
import com.probiz.estore.eai.log.dao.EaiJobLogDao;

/**
 * Dao implementation for EaiJobLog.
*/
public class EaiJobLogDaoImpl extends HibernateGenericDaoImpl<EaiJobLog> implements EaiJobLogDao {

	public EaiJobLog findLastEaiJobLogByName(String name) {
		String hql="from EaiJobLog e where e.jobName=? and e.status=1 order by e.jobExecuteTime desc";
		List<EaiJobLog> list=this.findByHql(hql, name);
		if(list!=null&&list.size()>0){
			return list.get(0);
		}else{
			return null;
		}
	}

}
